<extend name="Public/base"/>
<block name="body">
    <!-- 标题 -->
    <div class="main-title">
        <h2>{$meta_title}</h2>
    </div>
    <!-- 按钮工具栏 -->
    <div class="cf">
        <div class="fl">
            <div class="btn-group">
                <a class="btn" href="{:addons_url('Weixin://Menu/add')}">新 增</a>
                <a class="btn confirm ajax-get" href="{:addons_url('Weixin://Menu/build')}">生成菜单</a>
                <!--<button url="{:U('del')}" class="btn ajax-post confirm" target-form="ids" >删 除</button>-->
                <!--<notempty name="Think.get.title"><a class="btn" href="{:U('index')}">返回全部</a></notempty>-->
            </div>
        </div>
    </div>
    <!-- 数据表格 -->
    <div class="data-table">
        <table>
            <!-- 表头 -->
            <thead>
            <tr>
                <th>菜单名称</th>
                <th>菜单类型</th>
                <th>URL或KEY</th>
                <th>排序</th>
                <th>操作</th>
            </tr>
            </thead>
            <!-- 列表 -->
            <tbody>
            <volist name="addons_menu_list" id="data">
                <tr class="">
                    <td>{$data.name}</td>
                    <td>{$data.menu_type}</td>
                    <td>{$data.key}</td>
                    <td>{$data.sort|default='0'}</td>
                    <td>
                        <a href="{:addons_url('Weixin://Menu/edit',array('id'=>$data['id']))}">编辑</a>
                        <a href="{:addons_url('Weixin://Menu/del',array('id'=>$data['id']))}" class="confirm ajax-get">删除</a>
                    </td>
                </tr>
                <notempty name="data.son">
                    <volist name="data.son" id="voo">
                        <tr class="">
                            <td style="padding-left:60px;">{$voo.name}</td>
                            <td>{$voo.menu_type}</td>
                            <td>{$voo.key}</td>
                            <td>{$data.sort|default='0'}</td>
                            <td>
                                <a href="{:addons_url('Weixin://Menu/edit',array('id'=>$voo['id']))}">编辑</a>
                                <a href="{:addons_url('Weixin://Menu/del',array('id'=>$voo['id']))}"
                                   class="confirm ajax-get">删除</a>
                            </td>
                        </tr>
                    </volist>
                </notempty>
            </volist>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
    </div>

</block>
<block name="script">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '
        <link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">
        ';
    </php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav("{:U('adminList',array('name'=>'Weixin'))}");
    </script>
</block>
